package com.ruoyi.video.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;

/**
 * 摄像机对象 video_camera
 * 
 * @author ruoyi
 * @date 2024-12-09
 */
public class VideoCamera extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    public static final String TYPE_ONVIF = "onvif";
    public static final String TYPE_RTSP = "rtsp";
    public static final String TYPE_SDK = "sdk";

    /** 主键 */
    private Long id;

    /** 所属分组 */
    @Excel(name = "所属分组")
    private String groupName;
    private Long groupId;

    /** 代码 */
    @Excel(name = "代码")
    @NotNull
    private String code;

    /** 名称 */
    @Excel(name = "名称")
    @NotNull
    private String name;

    /** 接入方式 */
    @Excel(name = "接入方式", dictType = "camera_type", comboReadDict = true)
    @NotNull
    private String type;

    /** IP地址 */
    @Excel(name = "IP地址")
    @NotNull
    private String ip;

    /** 端口 */
    @Excel(name = "端口号")
    private Integer port;

    /** 通道数 */
    private Integer channels;

    /** rtsp地址 */
    @Excel(name = "RTSP")
    private String rtsp;

    /** 账号 */
    @Excel(name = "账号")
    private String username;

    /** 密码 */
    @Excel(name = "密码")
    private String password;

    /** 状态 */
    @Excel(name = "状态", dictType = "camera_status")
    private String status;

    /** 是否在线 */
    @Excel(name = "是否在线", dictType = "sys_yes_no", type = Excel.Type.EXPORT)
    private String online;

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setGroupId(Long groupId) 
    {
        this.groupId = groupId;
    }

    public Long getGroupId() 
    {
        return groupId;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setPort(Integer port) 
    {
        this.port = port;
    }

    public Integer getPort() 
    {
        return port;
    }
    public void setChannels(Integer channels) 
    {
        this.channels = channels;
    }

    public Integer getChannels() 
    {
        return channels;
    }
    public void setRtsp(String rtsp) 
    {
        this.rtsp = rtsp;
    }

    public String getRtsp() 
    {
        return rtsp;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setOnline(String online) 
    {
        this.online = online;
    }

    public String getOnline() 
    {
        return online;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("groupId", getGroupId())
            .append("code", getCode())
            .append("name", getName())
            .append("type", getType())
            .append("ip", getIp())
            .append("port", getPort())
            .append("channels", getChannels())
            .append("rtsp", getRtsp())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("status", getStatus())
            .append("online", getOnline())
            .toString();
    }
}
